|
|
|
|
|
|
|
Figure 12.18
Reflecting an object across an arbitrary line. |
|
|
|
 |
|
|
|
|
Else
M(i, j) = 0
End If
Next j
Next i
End Sub
' Create a translation matrix for translation by
' distances tx and ty. Public Sub m2Translate(Result() As Single, _
ByVal tx As Single, ByVal ty As Single)
m2Identity Result
Result(3, 1) = tx
Result(3, 2) = ty
End Sub
' Create a scaling matrix for scaling by factors
' of sx and sy. Public Sub m2Scale(Result() As Single, _
ByVal sx As Single, ByVal sy As Single)
m2Identity Result |
|
|
|
|
|